<?php
class ModelCatalogdanhmuchome extends Model {
	public function getdanhmuchome($danhmuchome_id) {
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "danhmuchome d LEFT JOIN " . DB_PREFIX . "danhmuchome_info di ON (d.danhmuchome_id = di.danhmuchome_id) WHERE d.danhmuchome_id = '" . (int)$danhmuchome_id . "' AND di.language_id = '" . (int)$this->config->get('config_language_id') . "'");
	
		return $query->row;	
	}
	
	public function getdanhmuchomes() {

			$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "danhmuchome d LEFT JOIN " . DB_PREFIX . "danhmuchome_info di ON (d.danhmuchome_id = di.danhmuchome_id) WHERE di.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY sort_order");
	
			$danhmuchome = $query->rows;
		 
		return $danhmuchome;
	} 
}
?>